--
-- PostgreSQL database dump
--

-- Dumped from database version 9.0.3
-- Dumped by pg_dump version 9.0.3
-- Started on 2011-05-19 11:29:28

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 358 (class 2612 OID 11574)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;


ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1550 (class 1259 OID 17316)
-- Dependencies: 6
-- Name: generated_reports; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE generated_reports (
    id integer NOT NULL,
    report_id integer NOT NULL,
    name character varying(255) NOT NULL,
    creation_date timestamp without time zone NOT NULL,
    modified_date timestamp without time zone NOT NULL,
    report_generation_date timestamp without time zone,
    reference character varying(255),
    report_user_id integer NOT NULL
);


ALTER TABLE public.generated_reports OWNER TO postgres;

--
-- TOC entry 1579 (class 1259 OID 17477)
-- Dependencies: 6
-- Name: generated_reports_data; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE generated_reports_data (
    id integer NOT NULL,
    generated_reports_id integer NOT NULL,
    data_value character varying(4096),
    report_particular_type_id bigint NOT NULL
);


ALTER TABLE public.generated_reports_data OWNER TO postgres;

--
-- TOC entry 1581 (class 1259 OID 17486)
-- Dependencies: 6 1579
-- Name: generated_reports_data_generated_reports_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_data_generated_reports_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_data_generated_reports_id_seq OWNER TO postgres;

--
-- TOC entry 1939 (class 0 OID 0)
-- Dependencies: 1581
-- Name: generated_reports_data_generated_reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_data_generated_reports_id_seq OWNED BY generated_reports_data.generated_reports_id;


--
-- TOC entry 1940 (class 0 OID 0)
-- Dependencies: 1581
-- Name: generated_reports_data_generated_reports_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_data_generated_reports_id_seq', 1, false);


--
-- TOC entry 1580 (class 1259 OID 17480)
-- Dependencies: 6 1579
-- Name: generated_reports_data_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_data_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_data_id_seq OWNER TO postgres;

--
-- TOC entry 1941 (class 0 OID 0)
-- Dependencies: 1580
-- Name: generated_reports_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_data_id_seq OWNED BY generated_reports_data.id;


--
-- TOC entry 1942 (class 0 OID 0)
-- Dependencies: 1580
-- Name: generated_reports_data_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_data_id_seq', 0, true);


--
-- TOC entry 1582 (class 1259 OID 25669)
-- Dependencies: 6 1579
-- Name: generated_reports_data_report_particular_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_data_report_particular_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_data_report_particular_type_id_seq OWNER TO postgres;

--
-- TOC entry 1943 (class 0 OID 0)
-- Dependencies: 1582
-- Name: generated_reports_data_report_particular_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_data_report_particular_type_id_seq OWNED BY generated_reports_data.report_particular_type_id;


--
-- TOC entry 1944 (class 0 OID 0)
-- Dependencies: 1582
-- Name: generated_reports_data_report_particular_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_data_report_particular_type_id_seq', 1, false);


--
-- TOC entry 1551 (class 1259 OID 17322)
-- Dependencies: 1550 6
-- Name: generated_reports_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_id_seq OWNER TO postgres;

--
-- TOC entry 1945 (class 0 OID 0)
-- Dependencies: 1551
-- Name: generated_reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_id_seq OWNED BY generated_reports.id;


--
-- TOC entry 1946 (class 0 OID 0)
-- Dependencies: 1551
-- Name: generated_reports_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_id_seq', 0, true);


--
-- TOC entry 1552 (class 1259 OID 17324)
-- Dependencies: 1550 6
-- Name: generated_reports_report_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_report_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_report_id_seq OWNER TO postgres;

--
-- TOC entry 1947 (class 0 OID 0)
-- Dependencies: 1552
-- Name: generated_reports_report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_report_id_seq OWNED BY generated_reports.report_id;


--
-- TOC entry 1948 (class 0 OID 0)
-- Dependencies: 1552
-- Name: generated_reports_report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_report_id_seq', 1, false);


--
-- TOC entry 1553 (class 1259 OID 17326)
-- Dependencies: 6 1550
-- Name: generated_reports_report_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE generated_reports_report_user_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.generated_reports_report_user_id_seq OWNER TO postgres;

--
-- TOC entry 1949 (class 0 OID 0)
-- Dependencies: 1553
-- Name: generated_reports_report_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE generated_reports_report_user_id_seq OWNED BY generated_reports.report_user_id;


--
-- TOC entry 1950 (class 0 OID 0)
-- Dependencies: 1553
-- Name: generated_reports_report_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('generated_reports_report_user_id_seq', 1, false);


--
-- TOC entry 1554 (class 1259 OID 17328)
-- Dependencies: 6
-- Name: login; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE login (
    id integer NOT NULL,
    username character varying(255) NOT NULL,
    password character varying(255) NOT NULL
);


ALTER TABLE public.login OWNER TO postgres;

--
-- TOC entry 1555 (class 1259 OID 17334)
-- Dependencies: 6 1554
-- Name: login_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE login_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.login_id_seq OWNER TO postgres;

--
-- TOC entry 1951 (class 0 OID 0)
-- Dependencies: 1555
-- Name: login_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE login_id_seq OWNED BY login.id;


--
-- TOC entry 1952 (class 0 OID 0)
-- Dependencies: 1555
-- Name: login_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('login_id_seq', 4, true);


--
-- TOC entry 1585 (class 1259 OID 25709)
-- Dependencies: 6
-- Name: option_values; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE option_values (
    id integer NOT NULL,
    report_particulars_id integer NOT NULL,
    "values" character varying
);


ALTER TABLE public.option_values OWNER TO postgres;

--
-- TOC entry 1583 (class 1259 OID 25705)
-- Dependencies: 1585 6
-- Name: option_values_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE option_values_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.option_values_id_seq OWNER TO postgres;

--
-- TOC entry 1953 (class 0 OID 0)
-- Dependencies: 1583
-- Name: option_values_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE option_values_id_seq OWNED BY option_values.id;


--
-- TOC entry 1954 (class 0 OID 0)
-- Dependencies: 1583
-- Name: option_values_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('option_values_id_seq', 0, true);


--
-- TOC entry 1584 (class 1259 OID 25707)
-- Dependencies: 1585 6
-- Name: option_values_report_particulars_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE option_values_report_particulars_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.option_values_report_particulars_id_seq OWNER TO postgres;

--
-- TOC entry 1955 (class 0 OID 0)
-- Dependencies: 1584
-- Name: option_values_report_particulars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE option_values_report_particulars_id_seq OWNED BY option_values.report_particulars_id;


--
-- TOC entry 1956 (class 0 OID 0)
-- Dependencies: 1584
-- Name: option_values_report_particulars_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('option_values_report_particulars_id_seq', 1, false);


--
-- TOC entry 1556 (class 1259 OID 17336)
-- Dependencies: 6
-- Name: report; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE report (
    id integer NOT NULL,
    report_type_id integer NOT NULL,
    name character varying(255) NOT NULL,
    template_filename_id integer NOT NULL
);


ALTER TABLE public.report OWNER TO postgres;

--
-- TOC entry 1557 (class 1259 OID 17339)
-- Dependencies: 6 1556
-- Name: report_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_id_seq OWNER TO postgres;

--
-- TOC entry 1957 (class 0 OID 0)
-- Dependencies: 1557
-- Name: report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_id_seq OWNED BY report.id;


--
-- TOC entry 1958 (class 0 OID 0)
-- Dependencies: 1557
-- Name: report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_id_seq', 0, true);


--
-- TOC entry 1558 (class 1259 OID 17341)
-- Dependencies: 6
-- Name: report_particular_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE report_particular_type (
    id integer NOT NULL,
    name character varying(255) NOT NULL
);


ALTER TABLE public.report_particular_type OWNER TO postgres;

--
-- TOC entry 1559 (class 1259 OID 17344)
-- Dependencies: 1558 6
-- Name: report_particular_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_particular_type_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_particular_type_id_seq OWNER TO postgres;

--
-- TOC entry 1959 (class 0 OID 0)
-- Dependencies: 1559
-- Name: report_particular_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_particular_type_id_seq OWNED BY report_particular_type.id;


--
-- TOC entry 1960 (class 0 OID 0)
-- Dependencies: 1559
-- Name: report_particular_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_particular_type_id_seq', 0, true);


--
-- TOC entry 1560 (class 1259 OID 17346)
-- Dependencies: 6
-- Name: report_particulars; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE report_particulars (
    id integer NOT NULL,
    report_particulars_type_id integer NOT NULL,
    ui_type_id integer NOT NULL
);


ALTER TABLE public.report_particulars OWNER TO postgres;

--
-- TOC entry 1561 (class 1259 OID 17349)
-- Dependencies: 6 1560
-- Name: report_particulars_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_particulars_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_particulars_id_seq OWNER TO postgres;

--
-- TOC entry 1961 (class 0 OID 0)
-- Dependencies: 1561
-- Name: report_particulars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_particulars_id_seq OWNED BY report_particulars.id;


--
-- TOC entry 1962 (class 0 OID 0)
-- Dependencies: 1561
-- Name: report_particulars_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_particulars_id_seq', 0, true);


--
-- TOC entry 1562 (class 1259 OID 17351)
-- Dependencies: 6 1560
-- Name: report_particulars_report_particulars_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_particulars_report_particulars_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_particulars_report_particulars_type_id_seq OWNER TO postgres;

--
-- TOC entry 1963 (class 0 OID 0)
-- Dependencies: 1562
-- Name: report_particulars_report_particulars_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_particulars_report_particulars_type_id_seq OWNED BY report_particulars.report_particulars_type_id;


--
-- TOC entry 1964 (class 0 OID 0)
-- Dependencies: 1562
-- Name: report_particulars_report_particulars_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_particulars_report_particulars_type_id_seq', 1, false);


--
-- TOC entry 1578 (class 1259 OID 17465)
-- Dependencies: 1560 6
-- Name: report_particulars_ui_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_particulars_ui_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_particulars_ui_type_id_seq OWNER TO postgres;

--
-- TOC entry 1965 (class 0 OID 0)
-- Dependencies: 1578
-- Name: report_particulars_ui_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_particulars_ui_type_id_seq OWNED BY report_particulars.ui_type_id;


--
-- TOC entry 1966 (class 0 OID 0)
-- Dependencies: 1578
-- Name: report_particulars_ui_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_particulars_ui_type_id_seq', 1, false);


--
-- TOC entry 1563 (class 1259 OID 17353)
-- Dependencies: 1556 6
-- Name: report_report_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_report_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_report_type_id_seq OWNER TO postgres;

--
-- TOC entry 1967 (class 0 OID 0)
-- Dependencies: 1563
-- Name: report_report_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_report_type_id_seq OWNED BY report.report_type_id;


--
-- TOC entry 1968 (class 0 OID 0)
-- Dependencies: 1563
-- Name: report_report_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_report_type_id_seq', 1, false);


--
-- TOC entry 1564 (class 1259 OID 17355)
-- Dependencies: 6 1556
-- Name: report_template_filename_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_template_filename_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_template_filename_id_seq OWNER TO postgres;

--
-- TOC entry 1969 (class 0 OID 0)
-- Dependencies: 1564
-- Name: report_template_filename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_template_filename_id_seq OWNED BY report.template_filename_id;


--
-- TOC entry 1970 (class 0 OID 0)
-- Dependencies: 1564
-- Name: report_template_filename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_template_filename_id_seq', 1, false);


--
-- TOC entry 1565 (class 1259 OID 17357)
-- Dependencies: 6
-- Name: report_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE report_type (
    id integer NOT NULL,
    description character varying(255)
);


ALTER TABLE public.report_type OWNER TO postgres;

--
-- TOC entry 1566 (class 1259 OID 17360)
-- Dependencies: 6 1565
-- Name: report_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_type_id_seq OWNER TO postgres;

--
-- TOC entry 1971 (class 0 OID 0)
-- Dependencies: 1566
-- Name: report_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_type_id_seq OWNED BY report_type.id;


--
-- TOC entry 1972 (class 0 OID 0)
-- Dependencies: 1566
-- Name: report_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_type_id_seq', 2, true);


--
-- TOC entry 1567 (class 1259 OID 17362)
-- Dependencies: 6
-- Name: report_user; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE report_user (
    id integer NOT NULL,
    username character varying(255) NOT NULL,
    login_id integer NOT NULL,
    firstname character varying(50) NOT NULL,
    lastname character varying(50) NOT NULL,
    addrline1 character varying(255) NOT NULL,
    addrline2 character varying(255) NOT NULL,
    addrline3 character varying(255) NOT NULL,
    phone character varying(20) NOT NULL,
    mobile character varying(20) NOT NULL,
    usertitle character varying(50) NOT NULL,
    education character varying(10) NOT NULL,
    liciense character varying(20) NOT NULL,
    validupto date NOT NULL
);


ALTER TABLE public.report_user OWNER TO postgres;

--
-- TOC entry 1568 (class 1259 OID 17368)
-- Dependencies: 1567 6
-- Name: report_user_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_user_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_user_id_seq OWNER TO postgres;

--
-- TOC entry 1973 (class 0 OID 0)
-- Dependencies: 1568
-- Name: report_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_user_id_seq OWNED BY report_user.id;


--
-- TOC entry 1974 (class 0 OID 0)
-- Dependencies: 1568
-- Name: report_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_user_id_seq', 30, true);


--
-- TOC entry 1569 (class 1259 OID 17370)
-- Dependencies: 6 1567
-- Name: report_user_login_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE report_user_login_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.report_user_login_id_seq OWNER TO postgres;

--
-- TOC entry 1975 (class 0 OID 0)
-- Dependencies: 1569
-- Name: report_user_login_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE report_user_login_id_seq OWNED BY report_user.login_id;


--
-- TOC entry 1976 (class 0 OID 0)
-- Dependencies: 1569
-- Name: report_user_login_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('report_user_login_id_seq', 1, false);


--
-- TOC entry 1570 (class 1259 OID 17372)
-- Dependencies: 6
-- Name: template; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE template (
    id integer NOT NULL,
    template_filename_id integer NOT NULL,
    report_particulars_id integer NOT NULL,
    keywordintemplate character varying(255) NOT NULL
);


ALTER TABLE public.template OWNER TO postgres;

--
-- TOC entry 1571 (class 1259 OID 17375)
-- Dependencies: 6
-- Name: template_filename; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE template_filename (
    id integer NOT NULL,
    description character varying(255)
);


ALTER TABLE public.template_filename OWNER TO postgres;

--
-- TOC entry 1572 (class 1259 OID 17378)
-- Dependencies: 6 1571
-- Name: template_filename_id_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE template_filename_id_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.template_filename_id_id_seq OWNER TO postgres;

--
-- TOC entry 1977 (class 0 OID 0)
-- Dependencies: 1572
-- Name: template_filename_id_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE template_filename_id_id_seq OWNED BY template_filename.id;


--
-- TOC entry 1978 (class 0 OID 0)
-- Dependencies: 1572
-- Name: template_filename_id_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('template_filename_id_id_seq', 0, true);


--
-- TOC entry 1573 (class 1259 OID 17380)
-- Dependencies: 6 1570
-- Name: template_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE template_id_seq
    START WITH 1
    INCREMENT BY 1
    MINVALUE 0
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.template_id_seq OWNER TO postgres;

--
-- TOC entry 1979 (class 0 OID 0)
-- Dependencies: 1573
-- Name: template_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE template_id_seq OWNED BY template.id;


--
-- TOC entry 1980 (class 0 OID 0)
-- Dependencies: 1573
-- Name: template_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('template_id_seq', 0, true);


--
-- TOC entry 1574 (class 1259 OID 17382)
-- Dependencies: 6 1570
-- Name: template_report_particulars_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE template_report_particulars_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.template_report_particulars_id_seq OWNER TO postgres;

--
-- TOC entry 1981 (class 0 OID 0)
-- Dependencies: 1574
-- Name: template_report_particulars_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE template_report_particulars_id_seq OWNED BY template.report_particulars_id;


--
-- TOC entry 1982 (class 0 OID 0)
-- Dependencies: 1574
-- Name: template_report_particulars_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('template_report_particulars_id_seq', 1, false);


--
-- TOC entry 1575 (class 1259 OID 17384)
-- Dependencies: 6 1570
-- Name: template_template_filename_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE template_template_filename_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.template_template_filename_id_seq OWNER TO postgres;

--
-- TOC entry 1983 (class 0 OID 0)
-- Dependencies: 1575
-- Name: template_template_filename_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE template_template_filename_id_seq OWNED BY template.template_filename_id;


--
-- TOC entry 1984 (class 0 OID 0)
-- Dependencies: 1575
-- Name: template_template_filename_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('template_template_filename_id_seq', 1, false);


--
-- TOC entry 1576 (class 1259 OID 17386)
-- Dependencies: 6
-- Name: ui_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE ui_type (
    id integer NOT NULL,
    description character varying(255)
);


ALTER TABLE public.ui_type OWNER TO postgres;

--
-- TOC entry 1577 (class 1259 OID 17389)
-- Dependencies: 6 1576
-- Name: ui_type_id_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE ui_type_id_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.ui_type_id_id_seq OWNER TO postgres;

--
-- TOC entry 1985 (class 0 OID 0)
-- Dependencies: 1577
-- Name: ui_type_id_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE ui_type_id_id_seq OWNED BY ui_type.id;


--
-- TOC entry 1986 (class 0 OID 0)
-- Dependencies: 1577
-- Name: ui_type_id_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('ui_type_id_id_seq', 6, true);


--
-- TOC entry 1863 (class 2604 OID 17391)
-- Dependencies: 1551 1550
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports ALTER COLUMN id SET DEFAULT nextval('generated_reports_id_seq'::regclass);


--
-- TOC entry 1864 (class 2604 OID 17392)
-- Dependencies: 1552 1550
-- Name: report_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports ALTER COLUMN report_id SET DEFAULT nextval('generated_reports_report_id_seq'::regclass);


--
-- TOC entry 1865 (class 2604 OID 17393)
-- Dependencies: 1553 1550
-- Name: report_user_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports ALTER COLUMN report_user_id SET DEFAULT nextval('generated_reports_report_user_id_seq'::regclass);


--
-- TOC entry 1882 (class 2604 OID 17482)
-- Dependencies: 1580 1579
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports_data ALTER COLUMN id SET DEFAULT nextval('generated_reports_data_id_seq'::regclass);


--
-- TOC entry 1883 (class 2604 OID 17488)
-- Dependencies: 1581 1579
-- Name: generated_reports_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports_data ALTER COLUMN generated_reports_id SET DEFAULT nextval('generated_reports_data_generated_reports_id_seq'::regclass);


--
-- TOC entry 1884 (class 2604 OID 25671)
-- Dependencies: 1582 1579
-- Name: report_particular_type_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE generated_reports_data ALTER COLUMN report_particular_type_id SET DEFAULT nextval('generated_reports_data_report_particular_type_id_seq'::regclass);


--
-- TOC entry 1866 (class 2604 OID 17394)
-- Dependencies: 1555 1554
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE login ALTER COLUMN id SET DEFAULT nextval('login_id_seq'::regclass);


--
-- TOC entry 1885 (class 2604 OID 25712)
-- Dependencies: 1583 1585 1585
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE option_values ALTER COLUMN id SET DEFAULT nextval('option_values_id_seq'::regclass);


--
-- TOC entry 1886 (class 2604 OID 25713)
-- Dependencies: 1585 1584 1585
-- Name: report_particulars_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE option_values ALTER COLUMN report_particulars_id SET DEFAULT nextval('option_values_report_particulars_id_seq'::regclass);


--
-- TOC entry 1867 (class 2604 OID 17395)
-- Dependencies: 1557 1556
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report ALTER COLUMN id SET DEFAULT nextval('report_id_seq'::regclass);


--
-- TOC entry 1868 (class 2604 OID 17396)
-- Dependencies: 1563 1556
-- Name: report_type_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report ALTER COLUMN report_type_id SET DEFAULT nextval('report_report_type_id_seq'::regclass);


--
-- TOC entry 1869 (class 2604 OID 17397)
-- Dependencies: 1564 1556
-- Name: template_filename_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report ALTER COLUMN template_filename_id SET DEFAULT nextval('report_template_filename_id_seq'::regclass);


--
-- TOC entry 1870 (class 2604 OID 17398)
-- Dependencies: 1559 1558
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_particular_type ALTER COLUMN id SET DEFAULT nextval('report_particular_type_id_seq'::regclass);


--
-- TOC entry 1871 (class 2604 OID 17399)
-- Dependencies: 1561 1560
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_particulars ALTER COLUMN id SET DEFAULT nextval('report_particulars_id_seq'::regclass);


--
-- TOC entry 1872 (class 2604 OID 17400)
-- Dependencies: 1562 1560
-- Name: report_particulars_type_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_particulars ALTER COLUMN report_particulars_type_id SET DEFAULT nextval('report_particulars_report_particulars_type_id_seq'::regclass);


--
-- TOC entry 1873 (class 2604 OID 17467)
-- Dependencies: 1578 1560
-- Name: ui_type_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_particulars ALTER COLUMN ui_type_id SET DEFAULT nextval('report_particulars_ui_type_id_seq'::regclass);


--
-- TOC entry 1874 (class 2604 OID 17401)
-- Dependencies: 1566 1565
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_type ALTER COLUMN id SET DEFAULT nextval('report_type_id_seq'::regclass);


--
-- TOC entry 1875 (class 2604 OID 17402)
-- Dependencies: 1568 1567
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_user ALTER COLUMN id SET DEFAULT nextval('report_user_id_seq'::regclass);


--
-- TOC entry 1876 (class 2604 OID 17403)
-- Dependencies: 1569 1567
-- Name: login_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE report_user ALTER COLUMN login_id SET DEFAULT nextval('report_user_login_id_seq'::regclass);


--
-- TOC entry 1877 (class 2604 OID 17404)
-- Dependencies: 1573 1570
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE template ALTER COLUMN id SET DEFAULT nextval('template_id_seq'::regclass);


--
-- TOC entry 1878 (class 2604 OID 17405)
-- Dependencies: 1575 1570
-- Name: template_filename_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE template ALTER COLUMN template_filename_id SET DEFAULT nextval('template_template_filename_id_seq'::regclass);


--
-- TOC entry 1879 (class 2604 OID 17406)
-- Dependencies: 1574 1570
-- Name: report_particulars_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE template ALTER COLUMN report_particulars_id SET DEFAULT nextval('template_report_particulars_id_seq'::regclass);


--
-- TOC entry 1880 (class 2604 OID 17407)
-- Dependencies: 1572 1571
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE template_filename ALTER COLUMN id SET DEFAULT nextval('template_filename_id_id_seq'::regclass);


--
-- TOC entry 1881 (class 2604 OID 17408)
-- Dependencies: 1577 1576
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ui_type ALTER COLUMN id SET DEFAULT nextval('ui_type_id_id_seq'::regclass);


--
-- TOC entry 1922 (class 0 OID 17316)
-- Dependencies: 1550
-- Data for Name: generated_reports; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY generated_reports (id, report_id, name, creation_date, modified_date, report_generation_date, reference, report_user_id) FROM stdin;
\.


--
-- TOC entry 1932 (class 0 OID 17477)
-- Dependencies: 1579
-- Data for Name: generated_reports_data; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY generated_reports_data (id, generated_reports_id, data_value, report_particular_type_id) FROM stdin;
\.


--
-- TOC entry 1923 (class 0 OID 17328)
-- Dependencies: 1554
-- Data for Name: login; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY login (id, username, password) FROM stdin;
1	admin	admin
2	prvn	prvn
3	asdf	asdf
4	user	user
\.


--
-- TOC entry 1933 (class 0 OID 25709)
-- Dependencies: 1585
-- Data for Name: option_values; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY option_values (id, report_particulars_id, "values") FROM stdin;
\.


--
-- TOC entry 1924 (class 0 OID 17336)
-- Dependencies: 1556
-- Data for Name: report; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY report (id, report_type_id, name, template_filename_id) FROM stdin;
\.


--
-- TOC entry 1925 (class 0 OID 17341)
-- Dependencies: 1558
-- Data for Name: report_particular_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY report_particular_type (id, name) FROM stdin;
\.


--
-- TOC entry 1926 (class 0 OID 17346)
-- Dependencies: 1560
-- Data for Name: report_particulars; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY report_particulars (id, report_particulars_type_id, ui_type_id) FROM stdin;
\.


--
-- TOC entry 1927 (class 0 OID 17357)
-- Dependencies: 1565
-- Data for Name: report_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY report_type (id, description) FROM stdin;
1	bill
2	resume
\.


--
-- TOC entry 1928 (class 0 OID 17362)
-- Dependencies: 1567
-- Data for Name: report_user; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY report_user (id, username, login_id, firstname, lastname, addrline1, addrline2, addrline3, phone, mobile, usertitle, education, liciense, validupto) FROM stdin;
9	f	3	f	f	ff	f	ff	ff	f	ff	f	ff	2018-02-02
12	r	3	r	rr	r	r	rr	r	r	r	rr	r	1999-02-04
15	praveen	2	praveen	kumar	qwer	asdf	zxcv	26598741	9632587414	poiu	mca	h7889hkl9	2020-02-02
23	qwer	1	jkll	blb	lb	lbjlbj	jlb	6556	556	jkjk	bjkbjk	jjbklb	2020-03-03
24	varad	2	hjivhjiv	hvj	vhjvhj	hv	vhjvhj	665	5665	jkbkjb	kjkk	kbjkvv	2011-05-19
19	varun	1	khjk	kb	hj	kkh	kh	5555	55555	kjkj	kj	jkjk	2011-06-23
22	mnbv	1	kjkjv	kvk	vk	kk	kv	656	564564	oo	bbjkj	hjvh	2070-03-01
21	zxcvbnm	1	zzzZ	zz	z	zz	z	65456	65564	kjk	kk	kvk	2016-02-02
25	varun1	1	h	h	hh	k	kvhkvh	554	53	kk	kjk	kvv	2011-04-06
20	poiu	1	jkhh	kj	hkhk	h	k	4655	15656	hik	kkj	kk	2069-10-04
30	satwick	1	satwick	moorty	hj	hhkibv	hv	534564564	35445433	kjjk	bk	khjhjb	2011-05-04
\.


--
-- TOC entry 1929 (class 0 OID 17372)
-- Dependencies: 1570
-- Data for Name: template; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY template (id, template_filename_id, report_particulars_id, keywordintemplate) FROM stdin;
\.


--
-- TOC entry 1930 (class 0 OID 17375)
-- Dependencies: 1571
-- Data for Name: template_filename; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY template_filename (id, description) FROM stdin;
\.


--
-- TOC entry 1931 (class 0 OID 17386)
-- Dependencies: 1576
-- Data for Name: ui_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY ui_type (id, description) FROM stdin;
1	Textbox
2	Textarea
3	Selectbox
4	Radiobutton
5	Password
6	Date
\.


--
-- TOC entry 1888 (class 2606 OID 17410)
-- Dependencies: 1550 1550
-- Name: generated_reports_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY generated_reports
    ADD CONSTRAINT generated_reports_pkey PRIMARY KEY (id);


--
-- TOC entry 1908 (class 2606 OID 17505)
-- Dependencies: 1579 1579
-- Name: gernerated_report_data_id; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY generated_reports_data
    ADD CONSTRAINT gernerated_report_data_id PRIMARY KEY (id);


--
-- TOC entry 1890 (class 2606 OID 17412)
-- Dependencies: 1554 1554
-- Name: login_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY login
    ADD CONSTRAINT login_pkey PRIMARY KEY (id);


--
-- TOC entry 1910 (class 2606 OID 25718)
-- Dependencies: 1585 1585
-- Name: option_values_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY option_values
    ADD CONSTRAINT option_values_pkey PRIMARY KEY (id);


--
-- TOC entry 1894 (class 2606 OID 17414)
-- Dependencies: 1558 1558
-- Name: report_particular_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY report_particular_type
    ADD CONSTRAINT report_particular_type_pkey PRIMARY KEY (id);


--
-- TOC entry 1896 (class 2606 OID 17416)
-- Dependencies: 1560 1560
-- Name: report_particulars_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY report_particulars
    ADD CONSTRAINT report_particulars_pkey PRIMARY KEY (id);


--
-- TOC entry 1892 (class 2606 OID 17418)
-- Dependencies: 1556 1556
-- Name: report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY report
    ADD CONSTRAINT report_pkey PRIMARY KEY (id);


--
-- TOC entry 1898 (class 2606 OID 17420)
-- Dependencies: 1565 1565
-- Name: report_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY report_type
    ADD CONSTRAINT report_type_pkey PRIMARY KEY (id);


--
-- TOC entry 1900 (class 2606 OID 17422)
-- Dependencies: 1567 1567
-- Name: report_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY report_user
    ADD CONSTRAINT report_user_pkey PRIMARY KEY (id);


--
-- TOC entry 1904 (class 2606 OID 17424)
-- Dependencies: 1571 1571
-- Name: template_filename_id_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY template_filename
    ADD CONSTRAINT template_filename_id_pkey PRIMARY KEY (id);


--
-- TOC entry 1902 (class 2606 OID 17426)
-- Dependencies: 1570 1570
-- Name: template_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY template
    ADD CONSTRAINT template_pkey PRIMARY KEY (id);


--
-- TOC entry 1906 (class 2606 OID 17428)
-- Dependencies: 1576 1576
-- Name: ui_type_id_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY ui_type
    ADD CONSTRAINT ui_type_id_pkey PRIMARY KEY (id);


--
-- TOC entry 1919 (class 2606 OID 17506)
-- Dependencies: 1550 1579 1887
-- Name: generated_reports_data_generated_reports_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY generated_reports_data
    ADD CONSTRAINT generated_reports_data_generated_reports_id_fkey FOREIGN KEY (generated_reports_id) REFERENCES generated_reports(id);


--
-- TOC entry 1920 (class 2606 OID 25679)
-- Dependencies: 1558 1893 1579
-- Name: generated_reports_data_report_particular_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY generated_reports_data
    ADD CONSTRAINT generated_reports_data_report_particular_type_id_fkey FOREIGN KEY (report_particular_type_id) REFERENCES report_particular_type(id);


--
-- TOC entry 1911 (class 2606 OID 17429)
-- Dependencies: 1550 1891 1556
-- Name: generated_reports_report_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY generated_reports
    ADD CONSTRAINT generated_reports_report_id_fkey FOREIGN KEY (report_id) REFERENCES report(id);


--
-- TOC entry 1912 (class 2606 OID 17434)
-- Dependencies: 1899 1567 1550
-- Name: generated_reports_report_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY generated_reports
    ADD CONSTRAINT generated_reports_report_user_id_fkey FOREIGN KEY (report_user_id) REFERENCES report_user(id);


--
-- TOC entry 1921 (class 2606 OID 25719)
-- Dependencies: 1895 1585 1560
-- Name: option_values_report_particulars_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY option_values
    ADD CONSTRAINT option_values_report_particulars_id_fkey FOREIGN KEY (report_particulars_id) REFERENCES report_particulars(id);


--
-- TOC entry 1915 (class 2606 OID 17472)
-- Dependencies: 1905 1560 1576
-- Name: report_particulars_ui_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY report_particulars
    ADD CONSTRAINT report_particulars_ui_type_id_fkey FOREIGN KEY (ui_type_id) REFERENCES ui_type(id);


--
-- TOC entry 1913 (class 2606 OID 17439)
-- Dependencies: 1565 1897 1556
-- Name: report_report_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY report
    ADD CONSTRAINT report_report_type_id_fkey FOREIGN KEY (report_type_id) REFERENCES report_type(id);


--
-- TOC entry 1914 (class 2606 OID 17444)
-- Dependencies: 1556 1903 1571
-- Name: report_template_filename_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY report
    ADD CONSTRAINT report_template_filename_id_fkey FOREIGN KEY (template_filename_id) REFERENCES template_filename(id);


--
-- TOC entry 1916 (class 2606 OID 17449)
-- Dependencies: 1567 1889 1554
-- Name: report_user_login_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY report_user
    ADD CONSTRAINT report_user_login_id_fkey FOREIGN KEY (login_id) REFERENCES login(id);


--
-- TOC entry 1917 (class 2606 OID 17454)
-- Dependencies: 1895 1570 1560
-- Name: template_report_particulars_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY template
    ADD CONSTRAINT template_report_particulars_id_fkey FOREIGN KEY (report_particulars_id) REFERENCES report_particulars(id);


--
-- TOC entry 1918 (class 2606 OID 17459)
-- Dependencies: 1570 1571 1903
-- Name: template_template_filename_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY template
    ADD CONSTRAINT template_template_filename_id_fkey FOREIGN KEY (template_filename_id) REFERENCES template_filename(id);


--
-- TOC entry 1938 (class 0 OID 0)
-- Dependencies: 6
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2011-05-19 11:29:28

--
-- PostgreSQL database dump complete
--

